From 1bffb0b3cbeb49700382d58415f89026e4e61a43 Mon Sep 17 00:00:00 2001 From: Antonio Valentino Date: Sun, 22 Feb 2026 10:53:30 +0000 Subject: [PATCH] No abi3 Forwarded: not-needed Gbp-Pq: Name 0007-No-abi3.patch --- setup.py | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/setup.py b/setup.py index b205971..009ccad 100755 --- a/setup.py +++ b/setup.py @@ -1073,14 +1073,14 @@ if __name__ == "__main__": cmdclass = {"build_ext": BuildExtensions} compiler_directives = {"freethreading_compatible": True} - abi3_macros = [] - abi3_ext_kwargs = {} - abi3_cflags = "" - if platform.python_implementation() == "CPython" and not is_freethreaded(): - abi3_macros.append(("Py_LIMITED_API", "0x030B0000")) # 3.11 - abi3_cflags = f"-D{'='.join(abi3_macros[-1])}" - abi3_ext_kwargs["py_limited_api"] = True - cmdclass["bdist_wheel"] = bdist_wheel_abi3 + # abi3_macros = [] + # abi3_ext_kwargs = {} + # abi3_cflags = "" + # if platform.python_implementation() == "CPython" and not is_freethreaded(): + # abi3_macros.append(("Py_LIMITED_API", "0x030B0000")) # 3.11 + # abi3_cflags = f"-D{'='.join(abi3_macros[-1])}" + # abi3_ext_kwargs["py_limited_api"] = True + # cmdclass["bdist_wheel"] = bdist_wheel_abi3 def get_cython_extfiles(extnames): extdir = Path("tables") @@ -1100,13 +1100,13 @@ if __name__ == "__main__": # it would be nice to have an option or something to pass here, but # there doesn't seem to be one according to the docs, so temporarily set # the env var instead - orig_cflags = os.getenv("CFLAGS", None) - cflags = ( - f"{orig_cflags} {abi3_cflags}" - if orig_cflags - else abi3_cflags - ) - os.environ["CFLAGS"] = cflags + # orig_cflags = os.getenv("CFLAGS", None) + # cflags = ( + # f"{orig_cflags} {abi3_cflags}" + # if orig_cflags + # else abi3_cflags + # ) + # os.environ["CFLAGS"] = cflags try: cythonize( str(extpfile), @@ -1114,10 +1114,11 @@ if __name__ == "__main__": language_level="2", ) finally: - if orig_cflags is not None: - os.environ["CFLAGS"] = orig_cflags - else: - del os.environ["CFLAGS"] + # if orig_cflags is not None: + # os.environ["CFLAGS"] = orig_cflags + # else: + # del os.environ["CFLAGS"] + pass extfiles[extname] = extcfile return extfiles @@ -1250,8 +1251,8 @@ if __name__ == "__main__": "define_macros": def_macros, "include_dirs": inc_dirs, } - def_macros.extend(abi3_macros) - extension_kwargs.update(abi3_ext_kwargs) + # def_macros.extend(abi3_macros) + # extension_kwargs.update(abi3_ext_kwargs) extensions = [ Extension( -- 2.30.2